package com.ruoyi.project.park.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.park.mapper.BizMonitorMapper;
import com.ruoyi.project.park.domain.BizMonitor;
import com.ruoyi.project.park.service.IBizMonitorService;

/**
 * 停车场监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-08
 */
@Service
public class BizMonitorServiceImpl implements IBizMonitorService 
{
    @Autowired
    private BizMonitorMapper bizMonitorMapper;

    /**
     * 查询停车场监控
     * 
     * @param monitorId 停车场监控主键
     * @return 停车场监控
     */
    @Override
    public BizMonitor selectBizMonitorByMonitorId(String monitorId)
    {
        return bizMonitorMapper.selectBizMonitorByMonitorId(monitorId);
    }

    /**
     * 查询停车场监控列表
     * 
     * @param bizMonitor 停车场监控
     * @return 停车场监控
     */
    @Override
    public List<BizMonitor> selectBizMonitorList(BizMonitor bizMonitor)
    {
        return bizMonitorMapper.selectBizMonitorList(bizMonitor);
    }

    /**
     * 新增停车场监控
     * 
     * @param bizMonitor 停车场监控
     * @return 结果
     */
    @Override
    public int insertBizMonitor(BizMonitor bizMonitor)
    {
        bizMonitor.setCreateTime(DateUtils.getNowDate());
        return bizMonitorMapper.insertBizMonitor(bizMonitor);
    }

    /**
     * 修改停车场监控
     * 
     * @param bizMonitor 停车场监控
     * @return 结果
     */
    @Override
    public int updateBizMonitor(BizMonitor bizMonitor)
    {
        bizMonitor.setUpdateTime(DateUtils.getNowDate());
        return bizMonitorMapper.updateBizMonitor(bizMonitor);
    }

    /**
     * 批量删除停车场监控
     * 
     * @param monitorIds 需要删除的停车场监控主键
     * @return 结果
     */
    @Override
    public int deleteBizMonitorByMonitorIds(String[] monitorIds)
    {
        return bizMonitorMapper.deleteBizMonitorByMonitorIds(monitorIds);
    }

    /**
     * 删除停车场监控信息
     * 
     * @param monitorId 停车场监控主键
     * @return 结果
     */
    @Override
    public int deleteBizMonitorByMonitorId(String monitorId)
    {
        return bizMonitorMapper.deleteBizMonitorByMonitorId(monitorId);
    }
}
